package;


import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.text.FlxText;
import flixel.ui.FlxButton;
import flixel.util.FlxMath;
import flixel.util.FlxColor;
import flixel.addons.text.FlxTypeText;

/**
 * A FlxState which can be used for the game's menu.
 */
class PrimeroState extends PreguntaState
{
	/**
	 * Function that is called up when to state is created to set it up. 
	 */
	
	override public function create():Void
	{
		super.create();
	}
	
	override public function update():Void
	{
		super.update();
		switch(estado)
		{
			case "esperando":
				if (_reloj < 1 || (player1.getInput() == answer || player2.getInput() == answer || player3.getInput() == answer || player4.getInput() == answer))
				{
					_pregunta.start(0);
					estado = "mostrando";
					if (_reloj > 1)
					{
						channel.stop();
						channel = sound.play(30000);
					}
				}
		}
	}

}